<!-- 

forEach 不返回新数组
map 返回一个新数组

使用建议:
    如果你想遍历数组并做点事情

-->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const users = [
            { name:'Alice', age: 25 },
            { name:'Bob', age: 30 },
            { name:'Alice', age: 35 },
        ]

        users.forEach(v=>v.greet = '四年级')

        console.log('users',users);
        
    </script>
</body>
</html>